/*
 Navicat Premium Data Transfer

 Source Server         : kuddy.cn
 Source Server Type    : MySQL
 Source Server Version : 50552
 Source Host           : kuddy.cn
 Source Database       : beta

 Target Server Type    : MySQL
 Target Server Version : 50552
 File Encoding         : utf-8

 Date: 02/23/2017 15:45:43 PM
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
--  Table structure for `live_admin`
-- ----------------------------
DROP TABLE IF EXISTS `live_admin`;
CREATE TABLE `live_admin` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '管理员ID',
  `name` varchar(32) NOT NULL COMMENT '管理员登录名',
  `password` varchar(32) NOT NULL COMMENT '管理员密码',
  `group` int(2) DEFAULT NULL COMMENT '管理员所属权限组',
  `create_time` int(11) NOT NULL COMMENT '注册时间',
  `remark` text COMMENT '备注',
  PRIMARY KEY (`id`),
  UNIQUE KEY `live_admin_id_uindex` (`id`),
  UNIQUE KEY `live_admin_name_uindex` (`name`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COMMENT='管理员表';

-- ----------------------------
--  Records of `live_admin`
-- ----------------------------
BEGIN;
INSERT INTO `live_admin` VALUES ('1', 'admin', 'kuddy', null, '1487481122', '系统默认管理员');
COMMIT;

-- ----------------------------
--  Table structure for `live_system`
-- ----------------------------
DROP TABLE IF EXISTS `live_system`;
CREATE TABLE `live_system` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '设置ID',
  `class` varchar(32) DEFAULT NULL COMMENT '分类',
  `name` varchar(32) NOT NULL COMMENT '设置名称',
  `value` varchar(64) DEFAULT NULL COMMENT '设置值',
  `remark` text,
  PRIMARY KEY (`id`),
  UNIQUE KEY `live_system_id_uindex` (`id`),
  UNIQUE KEY `live_system_name_uindex` (`name`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COMMENT='系统设置';

-- ----------------------------
--  Records of `live_system`
-- ----------------------------
BEGIN;
INSERT INTO `live_system` VALUES ('1', 'system', 'title', '直播聚合', '网站标题');
COMMIT;

-- ----------------------------
--  Table structure for `live_system_menu`
-- ----------------------------
DROP TABLE IF EXISTS `live_system_menu`;
CREATE TABLE `live_system_menu` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '菜单ID',
  `name` varchar(32) NOT NULL COMMENT '菜单显示名称',
  `url` varchar(64) NOT NULL COMMENT '菜单URL',
  `explain` varchar(255) DEFAULT NULL COMMENT '菜单说明',
  PRIMARY KEY (`id`),
  UNIQUE KEY `live_system_menu_menu_id_uindex` (`id`),
  UNIQUE KEY `live_system_menu_url_uindex` (`url`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COMMENT='分类菜单';

-- ----------------------------
--  Records of `live_system_menu`
-- ----------------------------
BEGIN;
INSERT INTO `live_system_menu` VALUES ('1', 'CS:GO', 'csgo', '反恐精英：全球行动'), ('2', 'DOTA2', 'dota2', '刀塔2');
COMMIT;

-- ----------------------------
--  Table structure for `live_user`
-- ----------------------------
DROP TABLE IF EXISTS `live_user`;
CREATE TABLE `live_user` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '用户ID',
  `login_name` varchar(32) NOT NULL COMMENT '用户登录名',
  `nick_name` varchar(32) NOT NULL COMMENT '用户昵称',
  PRIMARY KEY (`id`),
  UNIQUE KEY `u_user_user_id_uindex` (`id`),
  UNIQUE KEY `u_user_user_login_name_uindex` (`login_name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='用户表';

-- ----------------------------
--  Table structure for `live_website_url`
-- ----------------------------
DROP TABLE IF EXISTS `live_website_url`;
CREATE TABLE `live_website_url` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '网站ID',
  `name` varchar(32) NOT NULL COMMENT '网站名',
  `url` varchar(255) NOT NULL COMMENT '网站URL',
  `remark` text COMMENT '备注',
  PRIMARY KEY (`id`),
  UNIQUE KEY `live_website_url_id_uindex` (`id`),
  UNIQUE KEY `live_website_url_website_name_uindex` (`name`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COMMENT='需要获取的网站URL';

-- ----------------------------
--  Records of `live_website_url`
-- ----------------------------
BEGIN;
INSERT INTO `live_website_url` VALUES ('1', 'huomao', 'http://www.huomao.com/channels/channel.json?page=1&page_size=120&game_url_rule=', null), ('2', 'douyu', 'http://open.douyucdn.cn/api/RoomApi/live/', null);
COMMIT;

SET FOREIGN_KEY_CHECKS = 1;
